Compile-time options
Compile-time options are certain features of NetHack that can be enabled or disabled when the game is compiled, that is, built afresh from the source code. Most of these can be selected in config.h, in particular, at the end of this file. This article is principally about those compile-time options that affect gameplay by adding or removing certain features of the game. Some features, such as compression of bones and save files, are enabled by similar means to the options described here, but do not have a highly visible effect on the user's experience. Many compile-time options change the format of the bones and save files, and will render these incompatible if they are changed. Enabling or disabling options The options are mainly controlled by certain lines in config.h, which may look like this one: #define KOPS /* Keystone Kops by Scott R. Turner */ The above line enables the Keystone Kops. If it is commented out, then Kops no longer exist in the game, and a shopkeeper who is robbed will have to fend for himself: /*#define KOPS*/ /* Keystone Kops by Scott R. Turner */ The /* and */ marks define a comment, a part of the source code that the compiler is instructed to ignore. Most newer compilers also accept a single-line comment like so: //#define KOPS /* Keystone Kops by Scott R. Turner */ Some options SINKS SINKS is enabled by default. If it is turned off, sinks do not appear; this may make the game harder, as it is no longer possible to get a random ring or a dishwasher by kicking a sink. WALLIFIED_MAZE WALLIFIED_MAZE is enabled by default. If it is turned off, walls cannot be drawn with the more attractive box drawing characters via IBMgraphics or DECgraphics. REINCARNATION REINCARNATION is enabled by default. If it is turned off, the Rogue level does not appear. KOPS KOPS is enabled by default. If it is turned off, the Keystone Kops do not appear, and a shopkeeper who is robbed will have to kill you himself. SEDUCE SEDUCE is enabled by default. If it is turned off, foocubi become level-draining monsters similar to vampires. Unlike most options, SEDUCE does not affect bones/save compatibility. STEED STEED is enabled by default. If it is turned off, it is no longer possible to ride horses and other steeds, and saddles do not exist. TOURIST TOURIST is enabled by default. If it is turned off, the Tourist role is removed, along with Hawaiian shirts, T-shirts, credit cards (including the Platinum Yendorian Express Card), and expensive cameras. ELBERETH ELBERETH is enabled by default. If it is turned off, engraving Elbereth does not repel monsters. Crowning is also removed, because the lawful crowned title is the Hand of Elbereth. There will still be engravings of Elbereth in the Castle and Sokoban levels, since level maps are defined outside the source code, but they will have no effect. REDO REDO is enabled by default. If it is turned off, control-A does not repeat the last command. EXP_ON_BOTL EXP_ON_BOTL is enabled by default. If it is turned off, the showexp option does not exist, and it is not possible to show the current experience points on the status display. This option sets a flag that is saved in the save file, and so EXP_ON_BOTL affects bones/save compatibility, even though one might expect that it would not. SCORE_ON_BOTL SCORE_ON_BOTL is not enabled by default. If it is turned on, a showscore option is enabled, which shows the current score on the status display when set. Like EXP_ON_BOTL, this option sets a flag that is saved in the save file. GOLDOBJ GOLDOBJ is not enabled by default. It enables an experimental feature, still being debugged, by which gold coins are considered an object like any other; currently your gold is stored separately from the rest of your inventory. AUTOPICKUP_EXCEPTIONS AUTOPICKUP_EXCEPTIONS is not enabled by default in the source code, though at least the official Linux binary includes it. If enabled, it is possible to specify, through options, certain objects that will or will not be automatically picked up in spite of the autopickup setting for their object type; using AUTOPICKUP_EXCEPTIONS, one can for instance specify that food rations are to be automatically picked up and cockatrice corpses are not. Without AUTOPICKUP_EXCEPTIONS, this distinction is not possible: either all food items are automatically picked up (by specifying % in pickup_types) or none are. SHELL This can be found in unixconf.h. By default this is on, and it allows the user to escape to the command-line shell with ; Disabling this is a good idea on public servers. Category:Development